import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersist from 'vuex-persist'

Vue.use(Vuex)

const vuexLocal = new VuexPersist({
  storage: window.localStorage
})

export default new Vuex.Store({
  state: {
    i18n: 'zh'
  },
  getters: {
  },
  mutations: {
    i18n(state,index) {
      state.i18n = index
    }
  },
  actions: {
  },
  plugins: [vuexLocal.plugin]
})
